package fr.emse.tatiana.cordtravisualisation;

import java.util.List;
import java.util.Vector;

import fr.emse.tatiana.graphical.DisplayRule;
import fr.emse.tatiana.replayable.IReplayableModel;
import fr.emse.tatiana.scoresheetvisualisation.ReplayableModelPart;

public class CordtraReplayableModelPart extends ReplayableModelPart {

	
	
	private List<Boolean> show;

	public CordtraReplayableModelPart(IReplayableModel model, List<Boolean> show) {
		super(model);
		this.show = show;
		// TODO Auto-generated constructor stub
	}

	@Override
	protected List<Object> getModelChildren() {
		List<Object> l = new Vector<Object>();
		for (int i=0; i<replayablemodel.getEventCount(); i++) {
			Object event = (replayablemodel.getEvent(i));
			for (int facet=0;facet<replayablemodel.getFacetCount();facet++) {
				if (show.get(facet))
					l.add(new ReplayableFacet(replayablemodel, event, facet));
			}
		}
		return l;
	}
	
	//TODO update refresh

}
